<?php
/*put parts together*/
/***************************
 * header frontend for website.
 ***************************/
session_start();
require_once('../config.php'); // config.php在根目录下
require_once( ROOT.'includes/db.php');
require_once( ROOT.'includes/user.php');

$user_email = getUserEmail();
$user = getUserByEmail($user_email);


require_once( ROOT.'main/header.php');
if(!isLoggedIn()){
	js_redirect('用户未登录，跳转至首页',HOME_URL);
	die();
}
if($user['is_rookie'] == 1):
/*
 * 如果用户第一次登陆，显示first_home.php
 */
	require_once('./first_home.php');
else:
?>

    <!-----------------------------左边------------------------->
	<div class='left_column'>
    	<!---头像----->
		<a href="#">
        	<img class="profile" src="../images/picture 077.JPG" alt="Touxiang" />
        </a>
		<!----基本资料----->
        <div class="basic_info">
        	<div>主人信息</div>
        	<div>宠物信息</div>
        </div>
	</div>
    
    <!-----------------------------中间和右边------------------------->
	<div class='main_column'>
    
    	<!-------------中间-------------------->
		<div class='main_left'>
        	
            <!-------------中间 上：状态-------------------->
			<div class='update_status'>
			<form action='' method="post">
            	<textarea name="status" class="status" placeholder="你在想什么"></textarea>
				<input class='submit_button' type='submit' value='发布' />
			</form>
			</div>
            
           <!-------------中间 下：新鲜事-------------------->
			<div class='feed'>
				
                <div class="feed_title">
                	新鲜事
                </div>
            
			</div>
            
            
		</div>    	
        <!-------------右边------------------->
		<div class='main_right'>
            <div class="main_right_title">
               猜你喜欢
            </div>
		</div>
	</div>

<script type="text/javascript" src="../scripts/user_home.js"></script>
<?php
require_once(ROOT.'main/footer.php');
endif;
?>
